package org.jupiter.blog.api.dto;

import lombok.Data;
import jakarta.validation.constraints.*;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@EqualsAndHashCode(callSuper = true)
@Data
public class JupiterTagDTO extends PageRequestDTO {

	private String uuid;

	@NotBlank(message = "标签名称不能为空")
	@Size(max = 64, message = "标签名称长度不能超过64")
	@Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_\\- ]+$", message = "标签名称格式不正确")
	private String name;

	@NotBlank(message = "标签颜色不能为空")
	@Size(max = 20, message = "颜色长度不能超过20")
	private String color;

	@Size(max = 500, message = "描述长度不能超过500")
	private String description;

	@Min(value = 0, message = "排序不能小于0")
	@Max(value = 9999, message = "排序不能大于9999")
	private Integer sort;

	private Boolean isActive;

	private Integer articleCount;

	private LocalDateTime createTime;

	private LocalDateTime updateTime;

	private LocalDateTime deleteTime;
}